#ifndef QEMBEDDEDMENU_H
#define QEMBEDDEDMENU_H


#include <QLinearGradient>
#include <QApplication>
#include <QPaintEvent>
#include <QPainter>
#include <QWidget>
#include <QAbstractButton>
#include <QAction>

#include <QObject>
#include <QList>


class Element : public QAbstractButton
{
Q_OBJECT

    public:
        Element(QWidget * parent = 0);
        void setLast(bool Last);
        bool isLast();


    protected :
        void paintEvent(QPaintEvent * event);
    private:
        bool last;
};

class List : public QWidget
{
Q_OBJECT

    public:
        List(QWidget * parent = 0);
        int Width();
        int Height();

        void addElement(Element * E);
        int Count();
        void clearList();
        void removeElement(int at);

    protected :
        void paintEvent(QPaintEvent * event);

    private :
        int count,width, height;
        QList <Element*> list;
};

class Back : public QAbstractButton
{
         Q_OBJECT

    public:
        Back(QWidget *parent = 0);

    protected:
        void paintEvent( QPaintEvent * event);
};

class QEMenu : public  QWidget
{
             Q_OBJECT

    public:
        QEMenu(QWidget *parent = 0);
        ~QEMenu();
        void addItem(QAction *item);
        void clearList();
        void GoHide();
    protected:
        void paintEvent( QPaintEvent *event);
    private:
        Back * bg;
        List * list;
};

#endif // QEMBEDDEDMENU_H
